/* ID of A/D converter attached to physical thermometer */
2
34
0
0
3
100
3
3
1
0
0
4
2
1
0
0
5
2
1
0
0
6
18
0
0
0
31
0
1
37
10
Thermostat
0
3
2
7
0
22
2
11
temperature
0
7
0
1
1
15
0
0
57
/* ID of A/D converter attached to physical thermostat */
2
34
0
0
1
1
3
3
1
0
0
4
2
1
0
0
5
2
1
0
0
6
18
0
0
0
31
0
1
38
20
Heater On/Off Switch
0
3
2
7
0
22
2
6
on/off
0
2
1
1
1
17
0
0
47
/* ID of physical switch connected to heater */
2
14
0
0
0
3
3
1
0
0
4
2
1
0
0
5
2
1
0
0
6
2
1
0
0
31
0
1
39
16
AC On/Off Switch
0
3
2
7
0
22
2
6
on/off
0
2
1
1
1
17
0
0
56
/* ID of physical switch connected to air conditioner */
2
14
0
0
0
3
3
1
0
0
4
2
1
0
0
5
2
1
0
0
6
2
1
0
0
31
0
1
40
14
Heater Control
0
3
3
13
0
22
2
19
desired temperature
0
0
1
0
1
22
2
18
actual temperature
0
2
1
0
2
22
2
11
sensitivity
0
4
1
0
3
32
0
0
0
4
25
0
0
0
5
31
0
0
0
6
38
0
0
0
7
23
1
0
0
8
23
1
0
0
9
23
1
0
0
10
23
1
0
0
11
23
1
0
0
12
23
1
0
0
31
0
1
41
10
AC Control
0
3
3
13
0
22
2
19
desired temperature
0
0
1
0
1
22
2
18
actual temperature
0
2
1
0
2
22
2
11
sensitivity
0
4
1
0
3
32
0
0
0
4
25
0
0
0
5
31
0
0
0
6
39
0
0
0
7
23
1
0
0
8
23
1
0
0
9
23
1
0
0
10
23
1
0
0
11
23
1
0
0
12
23
1
0
0
31
0
1
42
21
Heating and AC System
0
3
3
8
0
41
0
0
0
1
40
0
0
0
2
36
0
0
0
3
37
0
0
0
4
29
0
0
1
2
5
23
1
0
0
6
23
1
0
0
7
23
1
0
0
31
0
0
28321
28
0
5
Boxes
21
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
33
34
35
1
5
Links
2
2
3
2
5
Ports
2
0
1
3
6
Master
25
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
33
34
35
4
5
Boxes
16
24
25
26
27
28
29
30
31
32
36
37
38
39
40
41
42
5
5
Links
1
23
6
5
Ports
1
22
7
6
Master
18
22
23
24
25
26
27
28
29
30
31
32
36
37
38
39
40
41
42
8
5
Boxes
0
9
5
Links
0
10
5
Ports
0
11
6
Master
0
12
5
Boxes
0
13
5
Links
0
14
5
Ports
0
15
6
Master
0
16
5
Boxes
0
17
5
Links
0
18
5
Ports
0
19
6
Master
0
20
22
Primitives (Built-ins)
4
0
1
2
3
21
27
Boxes: Arithmetic Operators
9
4
5
6
8
14
19
20
21
33
22
21
Boxes: State Machines
7
7
9
10
13
18
34
35
23
17
Boxes: Interfaces
3
15
16
17
24
17
Boxes: Connectors
2
11
12
25
16
Boxes: Operators
8
24
25
26
27
28
30
31
32
26
26
Boxes: Function Generators
1
29
27
26
Boxes: Heater and AC Parts
7
36
37
38
39
40
41
42
9
0
1
1
1
2
1
9
0
1
2
3
20
21
22
23
24
0
1
2
3
3
1
7
4
5
6
7
25
26
27
4
5
6
7
4
1
4
8
9
10
11
8
9
10
11
5
0
6
0
4
12
13
14
15
12
13
14
15
7
0
8
0
4
16
17
18
19
16
17
18
19
667
This port is a connection point for a control link.
An output control port is ordinarily quiescent. When “poked” by a box it is on, however, it emits an infinitesimally short control “pulse” that can be transmitted instantaneously to other (input) control ports via a control link.
An input control port “listens” for control pulses and notifies the box it is on that such a pulse has been received. It acts exactly like a flip-flop whose value is set to “one” by a received control pulse, and whose value is reset to “zero” by the box it is on. The action of the box in response to a pulse on a particular input control port depends on its function, of course.
61
This is a primitive part in the “Concurrent” interpretation.
633
This port is a connection point for a data link.
An output data port is ordinarily quiescent. When “written to” by a box it is on, however, it emits for an infinitesimally short time a data value that can be transmitted instantaneously to other (input) data ports via a data link.
An input data port “listens” for data values and remembers the data value when it receives one. It acts exactly like a register whose value is set whenever a data value is received. (The new value overwrites any previous value that may have been in this register.) The box it is on may “read” the data value from any input data port at any time.
61
This is a primitive part in the “Concurrent” interpretation.
166
This link transmits a control “pulse” instantaneously from any output control port connected to its left end, to every input control port connected to its right end.
61
This is a primitive part in the “Concurrent” interpretation.
155
This link transmits a data value instantaneously from any output data port connected to its left end, to every input data port connected to its right end.
61
This is a primitive part in the “Concurrent” interpretation.
107
When “start” is poked, values are read from “x” and “y”, their sum is written to “z”, and “done” is poked.
60
start:
{
write (z, read (x) + read (y));
poke (done);
}
0
120
When “start” is poked, values are read from “x” and “y”, their difference (x-y) is written to “z”, and “done” is poked.
60
start:
{
write (z, read (x) - read (y));
poke (done);
}
0
111
When “start” is poked, values are read from “x” and “y”, their product is written to “z”, and “done” is poked.
60
start:
{
write (z, read (x) * read (y));
poke (done);
}
0
291
Initially, the state of this box is such that it thinks none of the control links attached to “ready” has been poked yet.
Exactly when all control links attached to “ready” have been poked at least once, “synchronized” is poked, and the state of this box is reset to its initial condition.
576
boolean *poked;
int number_poked;
int number_needed = size (ready);
/*------------------------------------*/
void reset ()
{
int i;
for (i = number_needed - 1; i >= 0; i--) poked [i] = FALSE;
When “start” is poked, the value of this box’s instance information is written to “z”, and “done” is poked.
64
start:
{
write (z, instance_information ());
poke (done);
}
0
302
Initially, the value of this box’s instance information is written to “z” and “done” is poked.
When “start” is poked, the value is read from “x” and compared to the last value written to “z”. If and only if they are different, the new value just read from “x” is written to “z”, and “done” is poked.
423
real last_value;
/*------------------------------------*/
void write_value ()
{
write (z, last_value);
poke (done);
}
/*------------------------------------*/
init:
{
last_value = instance_information;
write_value ();
}
/*------------------------------------*/
start:
{
real new_value;
new_value = read (x);
if (new_value != last_value)
{
last_value = new_value;
write_value ();
}
}
0
91
When “pass” is poked, a value is read from “x”, it is written to “z”, and “done” is poked.
48
pass:
{
write (z, read (x));
poke (done);
}
0
193
• When “pass1” is poked, the value of “x” is read, it is written to “z1”, and “done1” is poked.
• When “pass2” is poked, the value of “x” is read, it is written to “z2”, and “done2” is poked.
145
pass1:
{
write (z1, read (x));
poke (done1);
}
/*------------------------------------*/
pass2:
{
write (z2, read (x));
poke (done2);
}
0
191
• When “pass1” is poked, the value of “x1” is read, it is written to “z”, and “done” is poked.
• When “pass2” is poked, the value of “x2” is read, it is written to “z”, and “done” is poked.
143
pass1:
{
write (z, read (x1));
poke (done);
}
/*------------------------------------*/
pass2:
{
write (z, read (x2));
poke (done);
}
0
105
When “start” is poked, this box reads “delay” and waits that number of clock ticks before poking “done”.
49
start:
{
hold (read (delay));
poke (done);
}
0
136
When “start” is poked:
• If “x” > 0 then “positive” is poked.
• If “x” = 0 then “zero” is poked.
• If “x” < 0 then “negative” is poked.
133
start:
{
real xx;
xx = read (x);
if (xx > 0) poke (positive);
else if (xx == 0) poke (zero);
else poke (negative);
}
0
168
When “start” is poked, a value obtained from an A/D converter (whose identity is in the instance information for this box) is written to “sample”, and “done” is poked.
78
start:
{
write (sample, A_to_D (instance_information ()));
poke (done);
}
0
167
When “start” is poked, a value is read from “data” and is output to a D/A converter (whose identity is in the instance information for this box), and “done” is poked.
75
start:
{
D_to_A (instance_information (), read (data));
poke (done);
}
0
208
When “on” is poked, a physical switch (whose identity is given by the instance information of this box) is turned on, and “done” is poked. When “off” is poked, the switch is turned off, and “done” is poked.
183
on:
{
set_switch (instance_information (), TRUE);
poke (done);
}
/*------------------------------------*/
off:
{
set_switch (instance_information (), FALSE);
poke (done);
}
0
86
Upon completion of system initialization, “go” is poked. This box does nothing else.
23
init:
{
poke (go);
}
0
107
When “start” is poked, a value is read from “x”, its negation (-x) is written to “z”, and “done” is poked.
50
start:
{
write (z, -read (x));
poke (done);
}
0
114
When “start” is poked, a value is read from “x”, its absolute value (|x|) is written to “z”, and “done” is poked.
101
start:
{
real abs;
abs = read (x);
if (abs < 0) abs = -abs;
write (z, abs);
poke (done);
}
0
180
When “start” is poked, values are read from “x” and “max”. Then one of the following values is written to “z”:
• if x < max, then x
• if x ≥ max, then max
and “done” is poked.
181
start:
{
real input, high, output;
input = read (x);
high = read (max);
if (input > high) then output = high;
else output = input;
write (z, output);
poke (done);
}
0
395
A “Pin” acts just like an electrical terminal, in that it is the connector on an analog element (a box) to which a “Wire” can be attached.
If it is an input “Pin”, a “Wire” connected to it delivers a real-valued signal at every instant in time. If it is an output “Pin”, a “Wire” connected to it broadcasts the real-valued signal on the “Pin” to every input “Pin” that “Wire” is connected to.
0
298
A “Wire” acts just like an electrical wire (network), in that it is the thing that connects together the pins on analog elements (boxes).
A “Wire” connected to an output “Pin” delivers a real-valued signal produced by that “Pin”, at every instant in time, to every input “Pin” it is connected to.
8
0
3
3
0
2
11
3
1
2
14
4
0
1
3
4
1
0
1
5
0
2
2
5
1
2
7
6
0
1
1
6
1
1
2
11
16
4
3
1
0
13
0
1
1
13
16
2
0
1
4
1
0
13
22
1
1
13
38
2
0
1
5
4
0
11
0
1
1
11
9
3
2
7
9
3
3
7
19
3
4
11
19
2
0
1
2
1
2
3
3
4
6
4
0
15
19
1
1
19
19
3
2
19
28
3
3
11
28
3
4
11
38
2
0
1
1
2
3
2
3
4
0
19
z(t) = x(t) + y(t)
11
0
1
4
0
3
1
4
1
1
1
5
0
3
3
5
1
3
7
6
0
2
1
6
1
0
3
7
0
3
11
7
1
1
3
7
0
3
14
8
0
2
3
8
1
1
3
9
17
5
4
3
0
0
13
1
1
4
13
3
2
4
19
3
3
9
19
2
0
1
1
2
2
3
5
3
0
0
27
1
1
4
27
3
2
4
21
3
3
9
21
2
0
1
2
1
2
3
6
1
0
13
20
1
1
22
20
2
0
1
7
5
0
0
11
1
1
11
11
3
2
11
17
2
3
2
11
3
4
0
25
1
5
2
25
3
0
3
1
2
3
1
4
5
3
5
8
4
0
11
23
1
1
11
27
3
2
16
27
3
3
16
18
3
4
22
18
2
0
1
1
2
3
2
3
4
0
19
z(t) = x(t) - y(t)
11
0
1
4
0
3
1
4
1
1
1
5
0
3
3
5
1
3
7
6
0
2
1
6
1
0
3
7
0
3
11
7
1
1
3
7
0
3
14
8
0
2
3
8
1
1
3
9
17
5
4
3
0
0
13
1
1
4
13
3
2
4
19
3
3
9
19
2
0
1
1
2
2
3
5
3
0
0
27
1
1
4
27
3
2
4
21
3
3
9
21
2
0
1
2
1
2
3
6
1
0
13
20
1
1
22
20
2
0
1
7
5
0
0
11
1
1
11
11
3
2
11
17
2
3
2
11
3
4
0
25
1
5
2
25
3
0
3
1
2
3
1
4
5
3
5
8
4
0
11
23
1
1
11
27
3
2
16
27
3
3
16
18
3
4
22
18
2
0
1
1
2
3
2
3
4
0
49
z(t) = k * x(t), where k = instance information
12
0
1
4
0
3
3
4
1
3
7
5
0
2
1
5
1
1
7
6
0
3
1
6
1
0
3
7
0
1
11
7
1
1
14
8
0
3
11
8
1
3
14
9
0
2
3
9
1
2
1
3
8
3
9
17
6
4
3
0
0
20
1
1
4
20
3
2
4
21
3
3
9
21
2
0
1
1
2
2
3
5
1
0
13
20
1
1
22
20
2
0
1
6
3
0
7
11
1
1
8
11
3
2
8
19
3
3
9
19
2
0
1
1
2
2
3
7
4
0
0
18
1
1
2
18
3
2
2
5
3
3
5
5
3
4
5
8
2
0
1
2
1
2
3
3
4
8
3
0
5
14
1
1
5
15
3
2
11
15
3
3
11
17
2
0
1
1
2
2
3
9
4
0
11
23
1
1
11
26
3
2
16
26
3
3
16
18
3
4
22
18
2
0
1
1
2
3
2
3
4
0
13
z(t) = -x(t)
8
0
1
3
0
1
2
3
1
1
7
4
0
2
1
4
1
0
3
5
0
1
11
5
1
1
14
6
0
2
3
6
1
1
1
9
17
4
3
1
0
0
20
1
1
9
20
2
0
1
4
1
0
13
20
1
1
22
20
2
0
1
5
4
0
0
18
1
1
5
18
3
2
5
13
3
3
11
13
3
4
11
17
2
0
1
2
1
2
3
3
4
6
4
0
11
23
1
1
11
27
3
2
16
27
3
3
16
18
3
4
22
18
2
0
1
1
2
3
2
3
4
0
54
z(t) = x(t-1)
NOTE: time is measured in clock ticks.
14
0
1
6
0
5
2
6
1
3
7
4
0
1
2
4
1
5
7
8
0
2
1
8
1
0
3
7
0
3
11
7
1
3
14
9
0
1
11
9
1
1
14
11
0
5
11
11
1
5
14
12
0
2
3
12
1
3
1
10
8
3
3
8
5
10
22
7
4
1
0
7
11
1
1
10
11
2
0
1
6
3
0
0
20
1
1
5
20
3
2
5
25
3
3
10
25
2
0
1
1
2
2
3
7
4
0
0
18
1
1
2
18
3
2
2
5
3
3
5
5
3
4
5
8
2
0
1
2
1
2
3
3
4
8
3
0
14
25
1
1
18
25
3
2
18
20
3
3
22
20
2
0
1
2
1
2
3
9
5
0
5
14
1
1
5
17
3
2
9
17
3
3
9
5
3
4
12
5
3
5
12
8
2
0
1
1
2
3
2
3
4
4
5
11
1
0
12
14
1
1
12
22
2
0
1
12
4
0
12
28
1
1
12
31
3
2
17
31
3
3
17
18
3
4
22
18
2
0
1
1
2
3
2
3
4
0
73
z(t) = 0 for t < 0
= k for t ≥ 0, where k = instance information
6
1
7
3
0
0
1
3
1
2
14
4
0
1
11
4
1
1
14
5
0
0
3
5
1
2
1
9
17
2
9
8
3
3
1
0
13
20
1
1
22
20
2
0
1
4
1
0
11
14
1
1
11
17
2
0
1
5
4
0
11
23
1
1
11
27
3
2
16
27
3
3
16
18
3
4
22
18
2
0
1
1
2
3
2
3
4
0
131
z(t) = 0 for t < 0
= k for t = 0, where k = instance information
= k + ∫x(r)dr for t > 0, where r runs from 0+ to t
18
6
7
7
0
5
2
7
1
3
7
8
0
2
1
8
1
1
3
8
1
0
1
9
0
1
1
9
1
1
7
8
0
4
14
10
0
6
11
10
1
3
11
10
1
3
14
11
0
2
3
11
1
6
14
12
0
5
11
12
1
5
14
12
0
1
11
12
1
1
14
11
0
5
1
8
22
3
15
10
4
1
1
5
8
10
6
1
10
6
7
1
0
5
13
1
1
8
13
2
0
1
8
9
0
19
13
1
1
20
13
3
2
20
20
3
3
22
20
2
4
20
32
3
5
6
32
3
6
6
26
3
7
8
26
2
8
20
25
3
9
12
25
1
0
1
1
2
2
3
2
8
5
4
6
5
6
7
8
4
9
8
9
3
0
0
20
1
1
4
20
3
2
4
24
3
3
8
24
2
0
1
1
2
2
3
10
4
0
3
7
1
1
3
10
2
2
3
8
3
3
17
8
3
4
17
10
2
0
2
2
1
2
3
3
4
11
5
0
17
16
1
1
17
18
3
2
22
18
2
3
10
28
1
4
10
30
3
5
17
30
3
0
1
1
2
3
4
4
5
1
5
12
8
0
3
16
1
1
3
18
3
2
7
18
3
3
7
9
3
4
10
9
3
5
10
10
2
6
10
16
1
7
10
18
3
8
10
22
2
0
1
1
2
3
2
3
4
4
5
6
7
2
7
7
8
0
76
z(t) = (x(t) + z(t-1) + z(t-2)) / 3
NOTE: time is measured in clock ticks.
14
4
7
9
0
5
2
9
1
0
2
6
0
3
3
6
1
3
1
9
1
5
7
7
0
8
7
12
0
1
1
7
1
3
7
10
0
1
3
10
1
1
7
11
0
8
2
11
1
2
2
12
1
4
2
12
1
5
1
13
16
3
5
17
4
2
4
5
10
4
8
15
27
6
6
3
0
0
19
1
1
2
19
3
2
2
21
3
3
5
21
2
0
1
1
2
2
3
7
5
0
14
7
1
1
16
7
3
2
16
12
3
3
12
12
3
4
12
18
3
5
13
18
2
0
1
1
2
3
2
3
4
4
5
9
6
0
6
7
1
1
10
7
2
2
8
7
3
3
8
13
3
4
4
13
3
5
4
19
3
6
5
19
2
0
2
2
1
2
3
4
3
4
5
5
6
10
1
0
9
20
1
1
13
20
2
0
1
11
5
0
17
19
1
1
18
19
3
2
18
24
3
3
14
24
3
4
14
30
3
5
15
30
2
0
1
1
2
3
2
3
4
4
5
12
7
0
19
30
1
1
21
30
3
2
21
19
3
3
22
19
2
4
21
2
3
5
1
2
3
6
1
7
3
7
2
7
2
0
1
2
1
2
3
4
2
5
4
5
6
6
7
0
203
z(t) = x(t) if x(t) ≤ |delta(t)| or x(t) ≥ |delta(t)|
= -|delta(t)| if -|delta(t)| < x < |delta(t)| and z(t-1) < 0
= +|delta(t)| if -|delta(t)| < x < |delta(t)| and z(t-1) ≥ 0
11
0
1
3
0
1
1
3
1
5
1
4
0
1
3
4
1
1
7
6
0
2
1
6
1
0
3
7
0
1
11
7
1
5
3
7
0
1
14
8
0
2
3
8
1
1
1
9
17
5
3
3
0
0
13
1
1
4
13
3
2
4
19
3
3
9
19
2
0
1
1
2
2
3
4
3
0
0
27
1
1
4
27
3
2
4
21
3
3
9
21
2
0
1
2
1
2
3
6
1
0
13
20
1
1
22
20
2
0
1
7
5
0
0
11
1
1
11
11
3
2
11
17
2
3
2
11
3
4
0
25
1
5
2
25
3
0
3
1
2
3
1
4
5
3
5
8
4
0
11
23
1
1
11
27
3
2
16
27
3
3
16
18
3
4
22
18
2
0
1
1
2
3
2
3
4
0
182
When “start” is poked, values are read from “x” and ”y”. Then:
• If “x” > “y” then “greater” is poked.
• If “x” = “y” then “equal” is poked.
• If “x” < “y” then “less” is poked.
16
4
2
8
0
6
1
8
1
5
2
9
0
6
3
9
1
6
7
10
0
7
2
10
1
0
2
11
0
6
11
11
1
6
14
12
0
7
11
12
1
7
13
13
0
1
2
13
1
7
14
14
0
2
2
14
1
7
15
15
0
3
2
15
1
2
6
4
16
7
12
16
8
8
3
0
0
12
1
1
2
12
3
2
2
18
3
3
4
18
2
0
1
1
2
2
3
9
3
0
0
26
1
1
2
26
3
2
2
20
3
3
4
20
2
0
1
2
1
2
3
10
1
0
8
19
1
1
12
19
2
0
1
11
3
0
11
0
1
1
11
8
3
2
6
8
3
3
6
16
2
0
1
2
1
2
3
12
5
0
6
22
1
1
6
24
3
2
10
24
3
3
10
12
3
4
14
12
3
5
14
16
2
0
1
1
2
3
2
3
4
4
5
13
3
0
13
22
1
1
13
30
3
2
4
30
3
3
4
38
2
0
1
2
1
2
3
14
3
0
14
22
1
1
14
31
3
2
11
31
3
3
11
38
2
0
1
2
1
2
3
15
3
0
15
22
1
1
15
30
3
2
18
30
3
3
18
38
2
0
1
1
2
2
3
0
200
Let “dt” be the instance information for this box; “dt” clock ticks following system initialization, “tick” is poked. Then “dt” clock ticks after that, “tick” is poked again, and so on ad infinitum.
8
4
7
2
0
3
2
2
1
3
14
7
0
1
2
7
1
4
14
6
0
3
11
6
1
4
11
7
1
0
14
7
0
3
0
3
6
3
12
16
4
3
16
3
2
1
0
7
19
1
1
12
19
2
0
1
6
5
0
5
22
1
1
5
26
3
2
9
26
3
3
9
12
3
4
14
12
3
5
14
16
2
0
1
1
2
3
2
3
4
4
5
7
8
0
14
22
1
1
14
30
3
2
11
30
3
3
11
38
2
4
1
30
3
5
1
14
3
6
5
14
3
7
5
16
2
8
5
12
1
0
1
2
1
2
3
4
2
5
4
5
6
6
7
8
6
0
737
When “start” is poked, values are read from “x” and “delta”. Then:
• If x ≤ -|delta| or x ≥ |delta|, then x is written to “z”.
• If -|delta| < x < |delta|, then if the last value previously written to “z” was negative, then -|delta| is written to “z”, else |delta| is written to “z”. (The first time “start” is poked, nothing has been written to “z” yet, but for purposes of this case the last value written is treated as non-negative.)
Finally, “done” is poked.
In short, this box makes sure it never outputs a value closer to zero than |delta|. Furthermore, it exhibits hysteresis in avoiding zero, so small oscillations in input (i.e., small compared to |delta|) will not cause the output value to oscillate between ±|delta|.
temperature(t) = actual temperature at time t, as measured by a thermometer
7
1
7
3
0
0
1
3
1
2
14
4
0
1
11
4
1
1
14
5
0
0
3
5
1
6
14
4
0
3
1
10
17
2
10
5
6
3
5
3
3
1
0
14
20
1
1
22
20
2
0
1
4
4
0
12
11
1
1
12
17
2
2
12
14
3
3
5
11
1
4
5
14
3
0
2
2
1
3
4
4
2
5
4
0
12
23
1
1
12
27
3
2
17
27
3
3
17
18
3
4
22
18
2
0
1
1
2
3
2
3
4
211
The physical thermometer is read on start-up, and then only once every 100 clock ticks. It is assumed the clock rate is such that the temperature is a very slowly varying quantity compared to the clock period.
76
temperature(t) = desired temperature at time t, as measured by a thermostat
7
1
7
3
0
0
1
3
1
2
14
4
0
1
11
4
1
1
14
5
0
0
3
5
1
6
14
4
0
3
1
10
17
2
10
5
6
3
5
3
3
1
0
14
20
1
1
22
20
2
0
1
4
4
0
12
11
1
1
12
17
2
2
12
14
3
3
5
11
1
4
5
14
3
0
2
2
1
3
4
4
2
5
4
0
12
23
1
1
12
27
3
2
17
27
3
3
17
18
3
4
22
18
2
0
1
1
2
3
2
3
4
204
The physical thermostat is read on start-up, and then once every clock tick. It is assumed the clock rate is such that this will give virtually immediate feedback when the thermostat setting is changed.
121
When on/off is negative, the heater is turned off (or remains off). Otherwise, the heater is turned on (or remains on).
9
0
1
3
0
2
2
3
1
0
3
4
0
2
11
4
1
2
13
5
0
1
10
5
1
2
14
5
0
2
15
6
0
1
12
6
1
2
1
9
21
2
9
11
4
3
3
0
0
20
1
1
4
20
3
2
4
14
3
3
9
14
2
0
1
2
1
2
3
4
4
0
0
18
1
1
2
18
3
2
2
8
3
3
11
8
3
4
11
11
2
0
1
2
1
2
3
3
4
5
4
0
10
17
1
1
10
21
2
2
10
19
3
3
11
17
1
4
11
19
3
0
2
2
1
3
4
2
4
6
1
0
12
17
1
1
12
21
2
0
1
211
The physical thermometer is read on start-up, and then only once every 100 clock ticks. It is assumed the clock rate is such that the temperature is a very slowly varying quantity compared to the clock period.
139
When on/off is negative, the air conditioner is turned off (or remains off). Otherwise, the air conditioner is turned on (or remains on).
9
0
1
3
0
2
2
3
1
0
3
4
0
2
11
4
1
2
13
5
0
1
10
5
1
2
14
5
0
2
15
6
0
1
12
6
1
2
1
9
21
2
9
11
4
3
3
0
0
20
1
1
4
20
3
2
4
14
3
3
9
14
2
0
1
2
1
2
3
4
4
0
0
18
1
1
2
18
3
2
2
8
3
3
11
8
3
4
11
11
2
0
1
2
1
2
3
3
4
5
4
0
10
17
1
1
10
21
2
2
10
19
3
3
11
17
1
4
11
19
3
0
2
2
1
3
4
2
4
6
1
0
12
17
1
1
12
21
2
0
1
211
The physical thermometer is read on start-up, and then only once every 100 clock ticks. It is assumed the clock rate is such that the temperature is a very slowly varying quantity compared to the clock period.
210
When the actual temperature falls below the desired temperature by more than sensitivity, the heater is turned on. It remains on until the temperature exceeds the desired temperature by more than sensitivity.
12
0
2
7
0
4
1
7
1
1
2
8
0
4
3
8
1
4
7
9
0
3
1
9
1
2
2
10
0
3
3
10
1
3
7
11
0
5
2
11
1
5
7
12
0
6
2
12
1
4
3
11
10
4
4
9
5
7
26
6
14
26
6
7
3
0
0
5
1
1
2
5
3
2
2
11
3
3
4
11
2
0
1
1
2
2
3
8
3
0
0
19
1
1
2
19
3
2
2
13
3
3
4
13
2
0
1
2
1
2
3
9
1
0
8
12
1
1
11
12
2
0
1
10
5
0
0
33
1
1
4
33
3
2
4
19
3
3
9
19
3
4
9
14
3
5
11
14
2
0
1
2
1
2
3
4
3
4
5
11
5
0
15
13
1
1
18
13
3
2
18
21
3
3
6
21
3
4
6
29
3
5
7
29
2
0
1
1
2
3
2
3
4
4
5
12
1
0
11
29
1
1
14
29
2
0
1
658
The implementation uses the Hysteresis Generator to make sure the heater is not cycled on and off too quickly, and that it stays on long enough to warm the actual temperature to sensitivity above the desired temperature. Furthermore, this ensures that the heater, once turned off, remains off until the actual temperature has fallen to at least sensitivity below the desired temperature.
The Low Pass Filter on the output of the Hysteresis Generator is included to weed out any spurious values that may be obtained due to noise, or that could be caused by someone changing the thermostat very rapidly. It also makes sure there are no start-up transients.
223
When the actual temperature rises above the desired temperature by more than sensitivity, the air conditioner is turned on. It remains on until the temperature falls below the desired temperature by more than sensitivity.
12
0
2
7
0
4
3
7
1
1
2
8
0
4
1
8
1
4
7
9
0
3
1
9
1
2
2
10
0
3
3
10
1
3
7
11
0
5
2
11
1
5
7
12
0
6
2
12
1
4
3
11
10
4
4
9
5
7
26
6
14
26
6
7
3
0
0
5
1
1
2
5
3
2
2
13
3
3
4
13
2
0
1
1
2
2
3
8
3
0
0
19
1
1
3
19
3
2
3
11
3
3
4
11
2
0
1
2
1
2
3
9
1
0
8
12
1
1
11
12
2
0
1
10
5
0
0
33
1
1
4
33
3
2
4
19
3
3
9
19
3
4
9
14
3
5
11
14
2
0
1
2
1
2
3
4
3
4
5
11
5
0
15
13
1
1
18
13
3
2
18
21
3
3
6
21
3
4
6
29
3
5
7
29
2
0
1
1
2
3
2
3
4
4
5
12
1
0
11
29
1
1
14
29
2
0
1
675
The implementation uses the Hysteresis Generator to make sure the air conditioner is not cycled on and off too quickly, and that it stays on long enough to cool the actual temperature to sensitivity below the desired temperature. Furthermore, this ensures that the air conditioner, once turned off, remains off until the actual temperature has risen to at least sensitivity above the desired temperature.
The Low Pass Filter on the output of the Hysteresis Generator is included to weed out any spurious values that may be obtained due to noise, or that could be caused by someone changing the thermostat very rapidly. It also makes sure there are no start-up transients.
157
This system controls a heater and an air conditioner, attempting to ensure that the actual temperature remains within ±2 degrees of the desired temperature.
9
2
7
5
0
1
0
5
1
0
0
5
1
3
7
6
0
1
2
6
1
0
2
6
1
4
7
7
0
1
4
7
1
0
4
7
1
5
0
13
22
1
13
10
2
2
5
3
2
16
4
2
27
3
5
5
0
6
8
1
1
9
8
3
2
9
11
3
3
13
11
2
4
9
23
3
5
13
23
2
0
1
1
2
2
3
2
4
4
5
6
5
0
6
19
1
1
10
19
3
2
10
13
3
3
13
13
2
4
10
25
3
5
13
25
2
0
1
2
1
2
3
1
4
4
5
7
5
0
6
30
1
1
11
30
3
2
11
15
3
3
13
15
2
4
11
27
3
5
13
27
2
0
1
2
4
2
3
4
1
4
5
140
The Step Generator generates a constant “2” for the sensitivity of the Heater and AC Controls. (This value is in its instance information.)